package org.wlw.web.dao.impl;

import org.apache.ibatis.session.SqlSession;
import org.wlw.web.dao.IColumnDao;
import org.wlw.web.mapper.ColumnMapper;
import org.wlw.web.models.Column;
import org.wlw.web.utils.DBUtils;

import java.util.List;

public class ColumnDao extends BaseDao<Column, ColumnMapper> implements IColumnDao {
    @Override
    public List<Column> findCanAddTopic() {
        SqlSession sqlSession = null;
        try {
            sqlSession = DBUtils.openSession();
            return (List<Column>)sqlSession.getMapper(ColumnMapper.class).findCanAddTopic();
        } finally {
            DBUtils.close(sqlSession);
        }
    }
}
